Rules for integrands of the form(((a+b Tanh[c+d (x^n)]))^p)

1:  ∫(((a+b Tanh[c+d (x^n)]))^p)dx  when (1/n)∈(SuperPlus[ℤ])∧ p∈ℤ

Derivation: Integration by substitution

Basis: If  -1≤n≤1 ∧ n≠0, then F[(x^n)]==(1/n) Subst[(x^((1/n)-1))F[x],x,(x^n)] (∂_x)(x^n)

Note: If (1/n)∈(SuperMinus[ℤ]), resulting integrand is not integrable.

Rule: If (1/n)∈(SuperPlus[ℤ])∧ p∈ℤ, then

∫(((a+b Tanh[c+d (x^n)]))^p)dx  ⟶  (1/n) Subst[∫(x^((1/n)-1)) (((a+b Tanh[c+d x]))^p)dx,x,(x^n)]

Program code:

Int[(a_.+b_.*Tanh[c_.+d_.*x_^n_])^p_.,x_Symbol] :=
  1/n*Subst[Int[x^(1/n-1)*(a+b*Tanh[c+d*x])^p,x],x,x^n] /;
FreeQ[{a,b,c,d,p},x] && IGtQ[1/n,0] && IntegerQ[p]

Int[(a_.+b_.*Coth[c_.+d_.*x_^n_])^p_.,x_Symbol] :=
  1/n*Subst[Int[x^(1/n-1)*(a+b*Coth[c+d*x])^p,x],x,x^n] /;
FreeQ[{a,b,c,d,p},x] && IGtQ[1/n,0] && IntegerQ[p]

X:  ∫(((a+b Tanh[c+d (x^n)]))^p)dx

Rule:

∫(((a+b Tanh[c+d (x^n)]))^p)dx  ⟶  ∫(((a+b Tanh[c+d (x^n)]))^p)dx

Program code:

Int[(a_.+b_.*Tanh[c_.+d_.*x_^n_])^p_.,x_Symbol] :=
  Integral[(a+b*Tanh[c+d*x^n])^p,x] /;
FreeQ[{a,b,c,d,n,p},x]

Int[(a_.+b_.*Coth[c_.+d_.*x_^n_])^p_.,x_Symbol] :=
  Integral[(a+b*Coth[c+d*x^n])^p,x] /;
FreeQ[{a,b,c,d,n,p},x]

S:  ∫(((a+b Tanh[c+d (u^n)]))^p)dx  when  u==e+f x

Derivation: Integration by substitution

Rule: If  u==e+f x, then

∫(((a+b Tanh[c+d (u^n)]))^p)dx  ⟶  (1/f)Subst[∫(((a+b Tanh[c+d (x^n)]))^p)dx,x,u]

Program code:

Int[(a_.+b_.*Tanh[c_.+d_.*u_^n_])^p_.,x_Symbol] :=
  1/Coefficient[u,x,1]*Subst[Int[(a+b*Tanh[c+d*x^n])^p,x],x,u] /;
FreeQ[{a,b,c,d,n,p},x] && LinearQ[u,x] && NeQ[u,x]

Int[(a_.+b_.*Coth[c_.+d_.*u_^n_])^p_.,x_Symbol] :=
  1/Coefficient[u,x,1]*Subst[Int[(a+b*Coth[c+d*x^n])^p,x],x,u] /;
FreeQ[{a,b,c,d,n,p},x] && LinearQ[u,x] && NeQ[u,x]

N:  ∫(((a+b Tanh[u]))^p)dx  when  u==c+d (x^n)

Derivation: Algebraic normalization

Rule: If  u==c+d (x^n), then

∫(((a+b Tanh[u]))^p)dx  ⟶  ∫(((a+b Tanh[c+d (x^n)]))^p)dx

Program code:

Int[(a_.+b_.*Tanh[u_])^p_.,x_Symbol] :=
  Int[(a+b*Tanh[ExpandToSum[u,x]])^p,x] /;
FreeQ[{a,b,p},x] && BinomialQ[u,x] && Not[BinomialMatchQ[u,x]]

Int[(a_.+b_.*Coth[u_])^p_.,x_Symbol] :=
  Int[(a+b*Coth[ExpandToSum[u,x]])^p,x] /;
FreeQ[{a,b,p},x] && BinomialQ[u,x] && Not[BinomialMatchQ[u,x]]

Rules for integrands of the form(((e x))^m) (((a+b Tanh[c+d (x^n)]))^p)

1.  ∫(x^m) (((a+b Tanh[c+d (x^n)]))^p)dx

1:  ∫(x^m) (((a+b Tanh[c+d (x^n)]))^p)dx  when ((m+1)/n)∈(SuperPlus[ℤ])∧ p∈ℤ

Derivation: Integration by substitution

Basis: If ((m+1)/n)∈ℤ, then (x^m)F[(x^n)]==(1/n) Subst[(x^(((m+1)/n)-1)) F[x],x,(x^n)] (∂_x)(x^n)

Note: If ((m+1)/n)∈(SuperMinus[ℤ]), resulting integrand is not integrable.

Rule: If ((m+1)/n)∈(SuperPlus[ℤ])∧ p∈ℤ, then

∫(x^m) (((a+b Tanh[c+d (x^n)]))^p)dx  ⟶  (1/n) Subst[∫(x^(((m+1)/n)-1)) (((a+b Tanh[c+d x]))^p)dx,x,(x^n)]

Program code:

Int[x_^m_.*(a_.+b_.*Tanh[c_.+d_.*x_^n_])^p_.,x_Symbol] :=
  1/n*Subst[Int[x^(Simplify[(m+1)/n]-1)*(a+b*Tanh[c+d*x])^p,x],x,x^n] /;
FreeQ[{a,b,c,d,m,n,p},x] && IGtQ[Simplify[(m+1)/n],0] && IntegerQ[p]

Int[x_^m_.*(a_.+b_.*Coth[c_.+d_.*x_^n_])^p_.,x_Symbol] :=
  1/n*Subst[Int[x^(Simplify[(m+1)/n]-1)*(a+b*Coth[c+d*x])^p,x],x,x^n] /;
FreeQ[{a,b,c,d,m,n,p},x] && IGtQ[Simplify[(m+1)/n],0] && IntegerQ[p]

2:  ∫(x^m) ((Tanh[c+d (x^n)])^2)dx

Note: Although this rule reduces the degree of the tangent factor, the resulting integral is not integrable unless ((m+1)/n)∈(SuperPlus[ℤ]).

Rule:

∫(x^m) ((Tanh[c+d (x^n)])^2)dx  ⟶  -(((x^(m-n+1)) Tanh[c+d (x^n)])/(d n))+∫(x^m)dx-((m-n+1)/(d n))∫(x^(m-n)) Tanh[c+d (x^n)]dx

Program code:

Int[x_^m_.*Tanh[c_.+d_.*x_^n_]^2,x_Symbol] :=
  -x^(m-n+1)*Tanh[c+d*x^n]/(d*n) + Int[x^m,x] + (m-n+1)/(d*n)*Int[x^(m-n)*Tanh[c+d*x^n],x] /;
FreeQ[{c,d,m,n},x]

Int[x_^m_.*Coth[c_.+d_.*x_^n_]^2,x_Symbol] :=
  -x^(m-n+1)*Coth[c+d*x^n]/(d*n) + Int[x^m,x] + (m-n+1)/(d*n)*Int[x^(m-n)*Coth[c+d*x^n],x] /;
FreeQ[{c,d,m,n},x]

X:  ∫(x^m) (((a+b Tanh[c+d (x^n)]))^p)dx

Rule:

∫(x^m) (((a+b Tanh[c+d (x^n)]))^p)dx  ⟶  ∫(x^m) (((a+b Tanh[c+d (x^n)]))^p)dx

Program code:

Int[x_^m_.*(a_.+b_.*Tanh[c_.+d_.*x_^n_])^p_.,x_Symbol] :=
  Integral[x^m*(a+b*Tanh[c+d*x^n])^p,x] /;
FreeQ[{a,b,c,d,m,n,p},x]

Int[x_^m_.*(a_.+b_.*Coth[c_.+d_.*x_^n_])^p_.,x_Symbol] :=
  Integral[x^m*(a+b*Coth[c+d*x^n])^p,x] /;
FreeQ[{a,b,c,d,m,n,p},x]

2:  ∫(((e x))^m) (((a+b Tanh[c+d (x^n)]))^p)dx

Derivation: Piecewise constant extraction

Basis: (∂_x)((((e x))^m)/(x^m))==0

Rule:

∫(((e x))^m) (((a+b Tanh[c+d (x^n)]))^p)dx  ⟶  (((e^(IntPart[m])) (((e x))^(FracPart[m])))/(x^(FracPart[m]))) ∫(x^m) (((a+b Tanh[c+d (x^n)]))^p)dx

Program code:

Int[(e_*x_)^m_.*(a_.+b_.*Tanh[c_.+d_.*x_^n_])^p_.,x_Symbol] :=
  e^IntPart[m]*(e*x)^FracPart[m]/x^FracPart[m]*Int[x^m*(a+b*Tanh[c+d*x^n])^p,x] /;
FreeQ[{a,b,c,d,e,m,n,p},x]

Int[(e_*x_)^m_.*(a_.+b_.*Coth[c_.+d_.*x_^n_])^p_.,x_Symbol] :=
  e^IntPart[m]*(e*x)^FracPart[m]/x^FracPart[m]*Int[x^m*(a+b*Coth[c+d*x^n])^p,x] /;
FreeQ[{a,b,c,d,e,m,n,p},x]

N:  ∫(((e x))^m) (((a+b Tanh[u]))^p)dx  when  u==c+d (x^n)

Derivation: Algebraic normalization

Rule: If  u==c+d (x^n), then

∫(((e x))^m) (((a+b Tanh[u]))^p)dx  ⟶  ∫(((e x))^m) (((a+b Tanh[c+d (x^n)]))^p)dx

Program code:

Int[(e_*x_)^m_.*(a_.+b_.*Tanh[u_])^p_.,x_Symbol] :=
  Int[(e*x)^m*(a+b*Tanh[ExpandToSum[u,x]])^p,x] /;
FreeQ[{a,b,e,m,p},x] && BinomialQ[u,x] && Not[BinomialMatchQ[u,x]]

Int[(e_*x_)^m_.*(a_.+b_.*Coth[u_])^p_.,x_Symbol] :=
  Int[(e*x)^m*(a+b*Coth[ExpandToSum[u,x]])^p,x] /;
FreeQ[{a,b,e,m,p},x] && BinomialQ[u,x] && Not[BinomialMatchQ[u,x]]

Rules for integrands of the form(x^m) ((Sech[a+b (x^n)])^p) Tanh[a+b (x^n)]

1:  ∫(x^m) ((Sech[a+b (x^n)])^p) Tanh[a+b (x^n)]dx  when  n∈ℤ ∧ m-n≥0

Derivation: Integration by parts

Note: Dummy exponent q=1 required in program code so InputForm of integrand is recognized.

Rule: If  n∈ℤ ∧ m-n≥0, then

∫(x^m) ((Sech[a+b (x^n)])^p) Tanh[a+b (x^n)]dx  ⟶  -(((x^(m-n+1)) ((Sech[a+b (x^n)])^p))/(b n p))+((m-n+1)/(b n p))∫(x^(m-n)) ((Sech[a+b (x^n)])^p)dx

Program code:

Int[x_^m_.*Sech[a_.+b_.*x_^n_.]^p_.*Tanh[a_.+b_.*x_^n_.]^q_.,x_Symbol] :=
  -x^(m-n+1)*Sech[a+b*x^n]^p/(b*n*p) +
  (m-n+1)/(b*n*p)*Int[x^(m-n)*Sech[a+b*x^n]^p,x] /;
FreeQ[{a,b,p},x] && RationalQ[m] && IntegerQ[n] && GeQ[m-n,0] && EqQ[q,1]

Int[x_^m_.*Csch[a_.+b_.*x_^n_.]^p_.*Coth[a_.+b_.*x_^n_.]^q_.,x_Symbol] :=
  -x^(m-n+1)*Csch[a+b*x^n]^p/(b*n*p) +
  (m-n+1)/(b*n*p)*Int[x^(m-n)*Csch[a+b*x^n]^p,x] /;
FreeQ[{a,b,p},x] && RationalQ[m] && IntegerQ[n] && GeQ[m-n,0] && EqQ[q,1]